/*
 * Copyright (C) 2011 bus.fm
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.busfm.activity;

import com.busfm.R;
import com.busfm.listener.NetResponseListener;
import com.busfm.model.ChannelList;
import com.busfm.model.PlayList;
import com.busfm.model.ResultEntity;
import com.busfm.model.UserEntity;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.view.LayoutInflater;
import android.view.View;

/**
 * @Description This is the base activity, and it handle the common function.
 * 
 * @author DJ
 * @version 1.0
 * @date 2011/08/20
 */
public class BaseActivity extends Activity implements NetResponseListener {
    public static final int DIALOG_WAIT = 1;
    
    @Override
    public Dialog onCreateDialog(int id) {
        switch (id) {
        case DIALOG_WAIT:
            LayoutInflater factory = LayoutInflater.from(this);
            View view = factory.inflate(R.layout.dialog_indeterminate_progress, null);
            AlertDialog.Builder builder = new AlertDialog.Builder(this)
                    .setTitle(R.string.dialog_title_waiting)
                    .setCancelable(true).setView(view);
            builder.setCancelable(false);
            Dialog dialog = builder.create();
            return dialog;
        default:
            break;
        }
        return super.onCreateDialog(id);
    }
    
    @Override
    public void clientDidLogin(NetResponseListener mClientListener, UserEntity userEnity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidRegister(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidResetPwd(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidChangePwd(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidCheckUserMail(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidCheckNickName(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidGetChannelList(NetResponseListener mClientListener, ChannelList channelList) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidGetPlayListByChannel(NetResponseListener mClientListener, PlayList playList, int cid) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidGetPlayListByUserId(NetResponseListener mClientListener, PlayList playList) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidSongIsFaved(NetResponseListener mClientListener, ResultEntity resultEntity) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidFaveThis(NetResponseListener mClientListener, ResultEntity resultEntity ,String songId) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidFailWithError(
        NetResponseListener mClientListener, int mOp, int scUnknown, String localizedMessage) {
        // TODO Auto-generated method stub

    }

    @Override
    public void clientDidRequireAuthentication(NetResponseListener mClientListener) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void clientNoNeedUpdate(NetResponseListener mClientListener) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void clientNoEnoughCredit(NetResponseListener mClientListener) {
        // TODO Auto-generated method stub
        
    }
}
